
#ifndef _VAO_VBO_H_
#define _VAO_VBO_H_


#include <glad/glad.h>  
#include <vector>

class VAOVBO{
public:

    VAOVBO() =default;
    VAOVBO(const GLvoid *pointsPtr, GLsizeiptr  vboSize, std::initializer_list<GLint> attribLengths)
        {init(pointsPtr, vboSize, attribLengths);}
    void init(const GLvoid *pointsPtr_, GLsizeiptr  vboSize_, std::initializer_list<GLint> attribLengths);

    ~VAOVBO(){
        // just release VBO
        // leave VAO and Textures to the program that still use them
        glDeleteBuffers(1, &this->mVBO );
    }
    
    inline GLuint get_VAO()const noexcept{ return this->mVAO; }
    

private:
    GLuint mVAO; 
    GLuint mVBO; 
};


#endif 